
//FOR MOSCOW STUDY


//start by loading MoscowClean.csv

//encode factor variables
encode dep2, gen(dep_enc)
encode region1, gen(reg_enc)


// TABLE 1 - DESCRIPTIVE STATISTICS

//experimental variables
tabstat bribe correct_guesses donate50, statistics(mean sd min max count) columns(statistics) format(%4.2f)

//nonexperimental variables
tabstat bribe_nonexp_dich psm job_intrinsic job_extrinsic job_pragmatic, statistics(mean sd min max count) columns(statistics) format(%4.2f)

//dependent variables
tabstat job_sect pub_avg fed_pref reg_pref gov_pref priv_avg corp_pref owner_pref sme_pref consult_pref finance_pref ngo_pref, statistics(mean sd min max count) columns(statistics) format(%4.2f)


// REGRESSIONS FOR TABLES 2 & 3 
// run these first; code for tables is below

global controls_moscow male risk_averse1 rel_pubsect gpa family_income i.class_yr ib5.dep_enc i.reg_enc

//career preferences regressed on bribe

eststo clear
foreach var in pub_avg job_sect fed_pref reg_pref gov_pref ngo_pref priv_avg finance_pref corp_pref consult_pref owner_pref sme_pref {  
   reg `var' bribe, robust
   estimates store `var'_bribe1_M
   }
   

eststo clear
foreach var in pub_avg job_sect fed_pref reg_pref gov_pref ngo_pref priv_avg finance_pref corp_pref consult_pref owner_pref sme_pref {  
   reg `var' bribe $controls_moscow, robust
   estimates store `var'_bribe2_M
   }
     

// career preferences regressed on cheating


eststo clear
foreach var in pub_avg job_sect fed_pref reg_pref gov_pref ngo_pref priv_avg finance_pref corp_pref consult_pref owner_pref sme_pref {  
   reg `var' correct_guesses, robust
   estimates store `var'_cheat1_M
   }
   
eststo clear
foreach var in pub_avg job_sect fed_pref reg_pref gov_pref ngo_pref priv_avg finance_pref corp_pref consult_pref owner_pref sme_pref {  
   reg `var' correct_guesses $controls_moscow, robust
   estimates store `var'_cheat2_M
   }
   
// career preferences regressed on donations

eststo clear
foreach var in pub_avg job_sect fed_pref reg_pref gov_pref ngo_pref priv_avg finance_pref corp_pref consult_pref owner_pref sme_pref {  
   reg `var' donate, robust
   estimates store `var'_donate1_M
   }
   
eststo clear
foreach var in pub_avg job_sect fed_pref reg_pref gov_pref ngo_pref priv_avg finance_pref corp_pref consult_pref owner_pref sme_pref {  
   reg `var' donate $controls_moscow, robust
   estimates store `var'_donate2_M
   }
   
//career preferences regressed on bribe justifiable
   
eststo clear
foreach var in pub_avg job_sect fed_pref reg_pref gov_pref ngo_pref priv_avg finance_pref corp_pref consult_pref owner_pref sme_pref {  
   reg `var' bribe_nonexp_dich, robust
   estimates store `var'_bribe_just1_M
   }
   
eststo clear
foreach var in pub_avg job_sect fed_pref reg_pref gov_pref ngo_pref priv_avg finance_pref corp_pref consult_pref owner_pref sme_pref {  
   reg `var' bribe_nonexp_dich $controls_moscow, robust
   estimates store `var'_bribe_just2_M
   }
   
//career preferences regressed on psm
   
eststo clear
foreach var in pub_avg job_sect fed_pref reg_pref gov_pref ngo_pref priv_avg finance_pref corp_pref consult_pref owner_pref sme_pref {  
   reg `var' psm, robust
   estimates store `var'_psm1_M
   }
   
eststo clear
foreach var in pub_avg job_sect fed_pref reg_pref gov_pref ngo_pref priv_avg finance_pref corp_pref consult_pref owner_pref sme_pref {  
   reg `var' psm $controls_moscow, robust
   estimates store `var'_psm2_M
   }
   
//career preferences regressed on job intrinsic
   
eststo clear
foreach var in pub_avg job_sect fed_pref reg_pref gov_pref ngo_pref priv_avg finance_pref corp_pref consult_pref owner_pref sme_pref {  
   reg `var' job_intrinsic, robust
   estimates store `var'_intrinsic1_M
   }
   
eststo clear
foreach var in pub_avg job_sect fed_pref reg_pref gov_pref ngo_pref priv_avg finance_pref corp_pref consult_pref owner_pref sme_pref {  
   reg `var' job_intrinsic $controls_moscow, robust
   estimates store `var'_intrinsic2_M
   }
   
//career preferences regressed on job extrinsic
   
eststo clear
foreach var in pub_avg job_sect fed_pref reg_pref gov_pref ngo_pref priv_avg finance_pref corp_pref consult_pref owner_pref sme_pref {  
   reg `var' job_extrinsic, robust
   estimates store `var'_extrinsic1_M
   }
   
eststo clear
foreach var in pub_avg job_sect fed_pref reg_pref gov_pref ngo_pref priv_avg finance_pref corp_pref consult_pref owner_pref sme_pref {  
   reg `var' job_extrinsic $controls_moscow, robust
   estimates store `var'_extrinsic2_M
   }
   
 
//TABLE 2


// Panel A - I

esttab pub_avg_bribe1_M pub_avg_bribe2_M job_sect_bribe1_M job_sect_bribe2_M fed_pref_bribe1_M fed_pref_bribe2_M reg_pref_bribe1_M reg_pref_bribe2_M gov_pref_bribe1_M gov_pref_bribe2_M ngo_pref_bribe1_M ngo_pref_bribe2_M, ///
se(3) b(3) r2 nogaps star(+ 0.10 * 0.05 ** 0.01 *** 0.001)keep (bribe) compress unstack replace label ///
collabels("") nonumbers starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001)  mtitles( "Pub Index" "Pub Index" "Binary" "Binary" "Federal" "Federal" "Regional" "Regional" "Budget Sector" "Budget Sector" "Non-Profit" "Non-Profit") /// 
varlabels(bribe "Gave/Accepted Bribe") ///
mgroups("Aggregated Indicators" "Disaggregated Indicators", pattern(1 0 0 0 1 0 0 0 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}))

// Panel A - II

esttab pub_avg_cheat1_M pub_avg_cheat2_M job_sect_cheat1_M job_sect_cheat2_M fed_pref_cheat1_M fed_pref_cheat2_M reg_pref_cheat1_M reg_pref_cheat2_M gov_pref_cheat1_M gov_pref_cheat2_M ngo_pref_cheat1_M ngo_pref_cheat2_M, ///
se(3) b(3) r2 nogaps star(+ 0.10 * 0.05 ** 0.01 *** 0.001)keep (correct_guesses) compress unstack replace label ///
collabels("") nonumbers starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001)  mtitles("Pub Index" "Pub Index"  "Binary" "Binary" "Federal" "Federal" "Regional" "Regional" "Budget Sector" "Budget Sector" "Non-Profit" "Non-Profit") /// 
varlabels(correct_guesses "Correct Guesses") ///
mgroups("Aggregated Indicators" "Disaggregated Indicators", pattern(1 0 0 0 1 0 0 0 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}))

// Panel A - III

esttab pub_avg_donate1_M pub_avg_donate2_M job_sect_donate1_M job_sect_donate2_M fed_pref_donate1_M fed_pref_donate2_M reg_pref_donate1_M reg_pref_donate2_M gov_pref_donate1_M gov_pref_donate2_M ngo_pref_donate1_M ngo_pref_donate2_M, ///
se(3) b(3) r2 nogaps star(+ 0.10 * 0.05 ** 0.01 *** 0.001)keep (donate) compress unstack replace label ///
collabels("") nonumbers starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001)  mtitles("Pub Index" "Pub Index" "Binary" "Binary" "Federal" "Federal" "Regional" "Regional" "Budget Sector" "Budget Sector" "Non-Profit" "Non-Profit") /// 
varlabels(correct_guesses "Donate") ///
mgroups("Aggregated Indicators" "Disaggregated Indicators", pattern(1 0 0 0 1 0 0 0 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}))


// Panel B - I

esttab priv_avg_bribe1_M priv_avg_bribe2_M finance_pref_bribe1_M finance_pref_bribe2_M corp_pref_bribe1_M corp_pref_bribe2_M consult_pref_bribe1_M consult_pref_bribe2_M owner_pref_bribe1_M owner_pref_bribe2_M sme_pref_bribe1_M sme_pref_bribe2_M, ///
se(3) b(3) r2 nogaps star(+ 0.10 * 0.05 ** 0.01 *** 0.001)keep (bribe) compress unstack replace label ///
collabels("") nonumbers starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001)  mtitles("Priv Index" "Priv Index" "Finance" "Finance" "Corporate" "Corporate" "Consulting" "Consulting" "Business Owner" "Business Owner" "Small Business" "Small Business") /// 
varlabels(bribe "Gave/Accepted Bribe") ///
mgroups("Aggregated Indicators" "Disaggregated Indicators", pattern(1 0 1 0 0 0 0 0 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}))

// Panel B - II

esttab priv_avg_cheat1_M priv_avg_cheat2_M finance_pref_cheat1_M finance_pref_cheat2_M corp_pref_cheat1_M corp_pref_cheat2_M consult_pref_cheat1_M consult_pref_cheat2_M owner_pref_cheat1_M owner_pref_cheat2_M sme_pref_cheat1_M sme_pref_cheat2_M, ///
se(3) b(3) r2 nogaps star(+ 0.10 * 0.05 ** 0.01 *** 0.001)keep (correct_guesses) compress unstack replace label ///
collabels("") nonumbers starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001)  mtitles("Priv Index" "Priv Index" "Finance" "Finance" "Corporate" "Corporate" "Consulting" "Consulting" "Business Owner" "Business Owner" "Small Business" "Small Business") /// 
varlabels(correct_guesses "Correct Guesses") ///
mgroups("Aggregated Indicators" "Disaggregated Indicators", pattern(1 0 1 0 0 0 0 0 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}))

// Panel B - III

esttab priv_avg_donate1_M priv_avg_donate2_M finance_pref_donate1_M finance_pref_donate2_M corp_pref_donate1_M corp_pref_donate2_M consult_pref_donate1_M consult_pref_donate2_M owner_pref_donate1_M owner_pref_donate2_M sme_pref_donate1_M sme_pref_donate2_M, ///
se(3) b(3) r2 nogaps star(+ 0.10 * 0.05 ** 0.01 *** 0.001)keep (donate) compress unstack replace label ///
collabels("") nonumbers starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001)  mtitles("Priv Index" "Priv Index" "Finance" "Finance" "Corporate" "Corporate" "Consulting" "Consulting" "Business Owner" "Business Owner" "Small Business" "Small Business") /// 
varlabels(correct_guesses "Donate") ///
mgroups("Aggregated Indicators" "Disaggregated Indicators", pattern(1 0 1 0 0 0 0 0 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}))



// TABLE 3

// Panel A - I

esttab pub_avg_bribe_just1_M pub_avg_bribe_just2_M job_sect_bribe_just1_M job_sect_bribe_just2_M fed_pref_bribe_just1_M fed_pref_bribe_just2_M reg_pref_bribe_just1_M reg_pref_bribe_just2_M gov_pref_bribe_just1_M gov_pref_bribe_just2_M ngo_pref_bribe_just1_M ngo_pref_bribe_just2_M, ///
se(3) b(3) r2 nogaps star(+ 0.10 * 0.05 ** 0.01 *** 0.001)keep (bribe_nonexp_dich) compress unstack replace label ///
collabels("") nonumbers starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001)  mtitles("Pub Index" "Pub Index" "Binary" "Binary" "Federal" "Federal" "Regional" "Regional" "Budget Sector" "Budget Sector" "Non-Profit" "Non-Profit") /// 
varlabels(bribe_justify2 "Bribe Justifiable") ///
mgroups("Aggregated Indicators" "Disaggregated Indicators", pattern(1 0 0 0 1 0 0 0 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}))

// Panel A - II

esttab pub_avg_psm1_M pub_avg_psm2_M job_sect_psm1_M job_sect_psm2_M fed_pref_psm1_M fed_pref_psm2_M reg_pref_psm1_M reg_pref_psm2_M gov_pref_psm1_M gov_pref_psm2_M ngo_pref_psm1_M ngo_pref_psm2_M, ///
se(3) b(3) r2 nogaps star(+ 0.10 * 0.05 ** 0.01 *** 0.001) keep (psm) compress unstack replace label ///
collabels("") nonumbers starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001)  mtitles("Pub Index" "Pub Index" "Binary" "Binary" "Federal" "Federal" "Regional" "Regional" "Budget Sector" "Budget Sector" "Non-Profit" "Non-Profit") /// 
varlabels(psm "PSM") ///
mgroups("Aggregated Indicators" "Disaggregated Indicators", pattern(1 0 0 0 1 0 0 0 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}))

// Panel A - III

esttab pub_avg_intrinsic1_M pub_avg_intrinsic2_M job_sect_intrinsic1_M job_sect_intrinsic2_M fed_pref_intrinsic1_M fed_pref_intrinsic2_M reg_pref_intrinsic1_M reg_pref_intrinsic2_M gov_pref_intrinsic1_M gov_pref_intrinsic2_M ngo_pref_intrinsic1_M ngo_pref_intrinsic2_M, ///
se(3) b(3) r2 nogaps star(+ 0.10 * 0.05 ** 0.01 *** 0.001) keep (job_intrinsic) compress unstack replace label ///
collabels("") nonumbers starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001)  mtitles("Pub Index" "Pub Index" "Binary" "Binary" "Federal" "Federal" "Regional" "Regional" "Budget Sector" "Budget Sector" "Non-Profit" "Non-Profit") /// 
varlabels(job_intrinsic "Intrinsic") ///
mgroups("Aggregated Indicators" "Disaggregated Indicators", pattern(1 0 0 0 1 0 0 0 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}))

// Panel A - IV

esttab pub_avg_extrinsic1_M pub_avg_extrinsic2_M job_sect_extrinsic1_M job_sect_extrinsic2_M fed_pref_extrinsic1_M fed_pref_extrinsic2_M reg_pref_extrinsic1_M reg_pref_extrinsic2_M gov_pref_extrinsic1_M gov_pref_extrinsic2_M ngo_pref_extrinsic1_M ngo_pref_extrinsic2_M, ///
se(3) b(3) r2 nogaps star(+ 0.10 * 0.05 ** 0.01 *** 0.001) keep (job_extrinsic) compress unstack replace label ///
collabels("") nonumbers starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001)  mtitles("Pub Index" "Pub Index" "Binary" "Binary" "Federal" "Federal" "Regional" "Regional" "Budget Sector" "Budget Sector" "Non-Profit" "Non-Profit") /// 
varlabels(job_extrinsic "Extrinsic") ///
mgroups("Aggregated Indicators" "Disaggregated Indicators", pattern(1 0 0 0 1 0 0 0 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}))


// Panel B - I

esttab priv_avg_bribe_just1_M priv_avg_bribe_just2_M finance_pref_bribe_just1_M finance_pref_bribe_just2_M corp_pref_bribe_just1_M corp_pref_bribe_just2_M consult_pref_bribe_just1_M consult_pref_bribe_just2_M owner_pref_bribe_just1_M owner_pref_bribe_just2_M sme_pref_bribe_just1_M sme_pref_bribe_just2_M, ///
se(3) b(3) r2 nogaps star(+ 0.10 * 0.05 ** 0.01 *** 0.001) keep (bribe_nonexp_dich) compress unstack replace label ///
collabels("") nonumbers starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001)  mtitles("Priv Index" "Priv Index" "Finance" "Finance" "Corporate" "Corporate" "Consulting" "Consulting" "Business Owner" "Business Owner" "Small Business" "Small Business") /// 
varlabels(bribe_justify2 "Bribe Justifiable") ///
mgroups("Aggregated Indicators" "Disaggregated Indicators", pattern(1 0 1 0 0 0 0 0 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}))


// Panel B - II

esttab priv_avg_psm1_M priv_avg_psm2_M finance_pref_psm1_M finance_pref_psm2_M corp_pref_psm1_M corp_pref_psm2_M consult_pref_psm1_M consult_pref_psm2_M owner_pref_psm1_M owner_pref_psm2_M sme_pref_psm1_M sme_pref_psm2_M, ///
se(3) b(3) r2 nogaps star(+ 0.10 * 0.05 ** 0.01 *** 0.001) keep (psm) compress unstack replace label ///
collabels("") nonumbers starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001)  mtitles("Priv Index" "Priv Index" "Finance" "Finance" "Corporate" "Corporate" "Consulting" "Consulting" "Business Owner" "Business Owner" "Small Business" "Small Business") /// 
varlabels(psm "PSM") ///
mgroups("Aggregated Indicators" "Disaggregated Indicators", pattern(1 0 1 0 0 0 0 0 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}))

// Panel B - III

esttab priv_avg_intrinsic1_M priv_avg_intrinsic2_M finance_pref_intrinsic1_M finance_pref_intrinsic2_M corp_pref_intrinsic1_M corp_pref_intrinsic2_M consult_pref_intrinsic1_M consult_pref_intrinsic2_M owner_pref_intrinsic1_M owner_pref_intrinsic2_M sme_pref_intrinsic1_M sme_pref_intrinsic2_M, ///
se(3) b(3) r2 nogaps star(+ 0.10 * 0.05 ** 0.01 *** 0.001) keep (job_intrinsic) compress unstack replace label ///
collabels("") nonumbers starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001)  mtitles("Priv Index" "Priv Index" "Finance" "Finance" "Corporate" "Corporate" "Consulting" "Consulting" "Business Owner" "Business Owner" "Small Business" "Small Business") /// 
varlabels(job_intrinsic "Intrinsic") ///
mgroups("Aggregated Indicators" "Disaggregated Indicators", pattern(1 0 1 0 0 0 0 0 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}))


// Panel B - IV

esttab priv_avg_extrinsic1_M priv_avg_extrinsic2_M finance_pref_extrinsic1_M finance_pref_extrinsic2_M corp_pref_extrinsic1_M corp_pref_extrinsic2_M consult_pref_extrinsic1_M consult_pref_extrinsic2_M owner_pref_extrinsic1_M owner_pref_extrinsic2_M sme_pref_extrinsic1_M sme_pref_extrinsic2_M, ///
se(3) b(3) r2 nogaps star(+ 0.10 * 0.05 ** 0.01 *** 0.001) keep (job_extrinsic) compress unstack replace label ///
collabels("") nonumbers starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001)  mtitles("Priv Index" "Priv Index" "Finance" "Finance" "Corporate" "Corporate" "Consulting" "Consulting" "Business Owner" "Business Owner" "Small Business" "Small Business") /// 
varlabels(job_extrinsic "Extrinsic") ///
mgroups("Aggregated Indicators" "Disaggregated Indicators", pattern(1 0 1 0 0 0 0 0 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}))


